home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-26 | 7.2 KB | 151 lines | [TEXT/MPS ] |
- #
- # File: BuildNeptuneMenu
- #
- # Contains: xxx put contents here xxx
- #
- # Version: xxx put version here xxx
- #
- # Copyright: © 1997-1998 by Apple Computer, Inc., all rights reserved.
- #
- #
- set echo 0
-
- Set -e USBDDKObjects "{NeptuneDDKFolder}Objects:";
- Set -e USBDDKTargets "{NeptuneDDKFolder}Targets:";
- Set -e USBDDKReleaseExtensions "{NeptuneDDKFolder}For System Folder (DDK Built):";
- Set -e USBDDKMapDir "{NeptuneDDKFolder}Targets:Maps:"
-
- Set -e USBDDKDrivers "{NeptuneDDKFolder}Drivers:";
- Set -e USBDDKExamples "{NeptuneDDKFolder}Examples:";
- Set -e USBDDKInterfaces "{NeptuneDDKFolder}Interfaces:";
- Set -e USBDDKRIncludes "{NeptuneDDKFolder}Interfaces:";
- Set -e USBDDKLibraries "{NeptuneDDKFolder}Libraries:";
-
- Set -e USBDDKInterfacesExternal "{CIncludes}";
- Set -e USBDDKInterfacesInternal "{NeptuneDDKFolder}Interfaces:";
-
- # •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- # Add the NeptuneDDK menu with its associated items.
- Set NeptuneDDKProjectMenuName NeptuneDDK; # NeptuneDDK is the name of the menu
-
- DeleteMenu "{NeptuneDDKProjectMenuName}" ∑ dev:null || Echo ∑ dev:null
-
-
- # ••••• Set Build mode (Engineering or SCM):
- #
- Alias SetBuildMenus 'If {NeptuneDDKEngrBuild} ; ∂
- AddMenu "NeptuneDDK" "Engineering Build!√" "Set -e NeptuneDDKEngrBuild 1; SetBuildMenus" ; ∂
- AddMenu "NeptuneDDK" "SCM Build" "Set -e NeptuneDDKEngrBuild 0 ; SetBuildMenus" ; ∂
- Else; ∂
- Set -e NeptuneDDKSymbols "-sym off"; ∂
- Set -e NeptuneDDKMBGSymbols "-mbg off"; ∂
- Set -e NeptuneDDKDebugFlag 0; ∂
- Set -e DebugBuild 0; ∂
- AddMenu "NeptuneDDK" "Engineering Build" "Set -e NeptuneDDKEngrBuild 1; SetBuildMenus" ; ∂
- AddMenu "NeptuneDDK" "SCM Build!√" "Set -e NeptuneDDKEngrBuild 0; SetBuildMenus" ; ∂
- End;'
-
- SetBuildMenus;
-
- AddMenu "{NeptuneDDKProjectMenuName}" '(-' ''
-
- # ••••• Does the basic build.
- #
- AddMenu "{NeptuneDDKProjectMenuName}" 'Build Driver or Example/ç' 'Open "{Worksheet}"; "{NeptuneDDKToolsFolder}"NeptuneDDKBuildDriver ∑∑ "{Worksheet}"'
-
-
- # ••••• Does the basic full build by specifying the -e delimeter to the make function.
- # Warning! This is dangerous because if a source file fails to assemble/compile, there still might be a corresponding
- # old object file hanging around which would get linked in as if there was no problem... - DMS
- # AddMenu "{NeptuneDDKProjectMenuName}" 'Full Build Driver or Example/ƒ' 'Open "{Worksheet}"; "{NeptuneDDKToolsFolder}"NeptuneDDKBuildDriver full ∑∑ "{Worksheet}"'
-
-
- # ••••• Deletes all the objects of the current driver as per its makefile - then does a full rebuild.
- #
- AddMenu "{NeptuneDDKProjectMenuName}" 'Clean & Rebuild Driver or Example…' 'Open "{Worksheet}"; ∂
- Confirm "Delete object files and rebuild?" || (Beep; Exit); ∂
- "{NeptuneDDKToolsFolder}"NeptuneDDKBuildDriver clean ∑∑ "{Worksheet}"'
-
- # ••••• Toggles the NeptuneDDKSymbols variable to turn debugger symbols on or off
- #
- AddMenu "{NeptuneDDKProjectMenuName}" 'Debug Symbols & Flags…' 'if "{NeptuneDDKSymbols}" == "-sym on"; ∂
- Confirm "Symbols and Flags are currently on. Turn all symbols off?" || (Beep; Exit); ∂
- Set -e NeptuneDDKSymbols "-sym off"; ∂
- Set -e NeptuneDDKMBGSymbols "-mbg off"; ∂
- Set -e NeptuneDDKDebugFlag 0; ∂
- Set -e DebugBuild 0; ∂
- Else; ∂
- Confirm "Symbols and Flags are currently off. Turn all symbols on?" || (Beep; Exit); ∂
- Set -e NeptuneDDKSymbols "-sym on"; ∂
- Set -e NeptuneDDKMBGSymbols "-mbg on"; ∂
- Set -e NeptuneDDKDebugFlag 1; ∂
- Set -e DebugBuild 1; ∂
- End; ∂
- Echo "# NeptuneDDKSymbols = "{NeptuneDDKSymbols} ∑∑ "{Worksheet}"; ∂
- Echo "# NeptuneDDKMBGSymbols = "{NeptuneDDKMBGSymbols} ∑∑ "{Worksheet}"; ∂
- Echo "# NeptuneDDKDebugFlag = "{NeptuneDDKDebugFlag} ∑∑ "{Worksheet}"; ';
-
-
-
- AddMenu "{NeptuneDDKProjectMenuName}" "(-" "";
-
-
- # ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- # This for loop puts all of the drivers directories in the NeptuneDDK menu.
- # When the driver name is selected in the menu, the current directory is set to where that folder currently exists.
- # The UserStartup script is executed again to get the proper menu un-checked and checked.
- #
- #echo "Add select driver"
- set foldersfound 0
- AddMenu "{NeptuneDDKProjectMenuName}" 'Select Driver in DriverSrc Folder' '';
- if `Exists "{NeptuneDDKFolder}DriverSrc"`
- For i In `Files -af -f -d "{NeptuneDDKFolder}DriverSrc"` # For all directories in Sources folder....
- (Evaluate "{i}" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null # Get the name of the folder, put in ®1
- Set char '' # else make sure there is no checkmark.
- AddMenu "DDKDriverList" "{®1}{char}" "(Directory ∂"{i}∂") ∑∑ ∂""{Worksheet}"∂" ; set -e USBDDKDriverPath {i}; set -e USBDDKDriver {®1}";
- set foldersfound '1'
- End
- if {foldersfound} == '1'
- AddMenu -link "{NeptuneDDKProjectMenuName}" 'Select Driver in DriverSrc Folder' 'DDKDriverList';
- End
- End
-
- #echo "Add select example"
- set foldersfound 0
- AddMenu "{NeptuneDDKProjectMenuName}" 'Select Example' '';
- if `Exists "{NeptuneDDKFolder}Examples"`
- For i In `Files -af -f -d "{NeptuneDDKFolder}Examples"` # For all directories in Examples folder....
- (Evaluate "{i}" =~ /≈':'≈':'(≈)®1':'/) ∑ dev:null # Get the name of the folder, put in ®1
- Set char '' # else make sure there is no checkmark.
- AddMenu "ExampleList" "{®1}{char}" "(Directory ∂"{i}∂") ∑∑ ∂""{Worksheet}"∂" ; set -e USBDDKDriverPath {i}; set -e USBDDKDriver {®1}";
- set foldersfound '1'
- End
- if {foldersfound} == '1'
- AddMenu -link "{NeptuneDDKProjectMenuName}" 'Select Example' 'ExampleList';
- End
- End
-
- #echo "Add create driver menu item"
- AddMenu "{NeptuneDDKProjectMenuName}" '(-' '';
- AddMenu "{NeptuneDDKProjectMenuName}" 'Create New Driver in DriverSrc folder…' 'Open "{Worksheet}"; ∂
- Set NewDriverName "`(Request "What is the name of the new driver?")≥dev:null`"; ∂
- if ¬ `Exists "{NeptuneDDKFolder}DriverSrc:""{NewDriverName}"`; ∂
- NewFolder "{NeptuneDDKFolder}DriverSrc:""{NewDriverName}"; ∂
- End; ∂
- Execute "{NeptuneDDKToolsFolder}NeptuneDDKMPWMenu"; '
-
- #echo "Add build menu items"
- AddMenu "{NeptuneDDKProjectMenuName}" '(-' '';
- AddMenu "{NeptuneDDKProjectMenuName}" 'Build All USB Drivers and examples…' 'Open "{Worksheet}"; ∂
- directory "{NeptuneDDKFolder}{NeptuneDDKLocalFolder}"; ∂
- "{NeptuneDDKToolsFolder}"NeptuneDDKBuildAll ∑∑ "{Worksheet}";'
-
- AddMenu "{NeptuneDDKProjectMenuName}" 'Clean & Build All USB Drivers and examples…' 'Open "{Worksheet}"; ∂
- directory "{NeptuneDDKFolder}{NeptuneDDKLocalFolder}"; ∂
- "{NeptuneDDKToolsFolder}"NeptuneDDKBuildAll clean ∑∑ "{Worksheet}";'
-
- AddMenu "{NeptuneDDKProjectMenuName}" 'Full Build All USB Drivers and examples…' 'Open "{Worksheet}"; ∂
- Confirm "FULL Build of all USB Drivers?∂n" || (Beep; Exit); ∂
- directory "{NeptuneDDKFolder}{NeptuneDDKLocalFolder}"; ∂
- "{NeptuneDDKToolsFolder}"NeptuneDDKBuildAll full ∑∑ "{Worksheet}";'
-